﻿using System.Windows.Forms;
using System.IO;

namespace MyNotepad
{
    public partial class AboutWindow : Form
    {
        StreamReader sr;
        string path;

        public AboutWindow()
        {
            InitializeComponent();
            path = Application.StartupPath;
            sr = new StreamReader(Path.Combine(path, "MyNotepadLicense.txt"));
            txtLicense.Text = sr.ReadToEnd();
            sr.Close();
        }

        private void lnkWinFormsDocking_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            sr = new StreamReader(Path.Combine(path, "WindowsFormsUIDockingLicense.txt"));
            txtLicense.Text = sr.ReadToEnd();
            lblLicense.Text = "WindowsFormsUIDocking License :";
            sr.Close();
        }

        private void lnkScintilla_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            sr = new StreamReader(Path.Combine(path, "ScintillaNETLicense.txt"));
            txtLicense.Text = sr.ReadToEnd();
            lblLicense.Text = "ScintillaNET License :";
            sr.Close();
        }        
    }
}
